/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: Universidad del Pais Vasco
 * License Type: Academic
 */
package orm;

import org.hibernate.Criteria;
import org.orm.PersistentException;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class RecursoCriteria extends AbstractORMCriteria {
	public final IntegerExpression id;
	public final StringExpression titulo;
	public final StringExpression autor;
	public final StringExpression materia;
	public final StringExpression isbn;
	
	public RecursoCriteria(Criteria criteria) {
		super(criteria);
		id = new IntegerExpression("id", this);
		titulo = new StringExpression("titulo", this);
		autor = new StringExpression("autor", this);
		materia = new StringExpression("materia", this);
		isbn = new StringExpression("isbn", this);
	}
	
	public RecursoCriteria(PersistentSession session) {
		this(session.createCriteria(Recurso.class));
	}
	
	public RecursoCriteria() throws PersistentException {
		this(orm.BibliotecaPersistentManager.instance().getSession());
	}
	
	public Recurso uniqueRecurso() {
		return (Recurso) super.uniqueResult();
	}
	
	public Recurso[] listRecurso() {
		java.util.List list = super.list();
		return (Recurso[]) list.toArray(new Recurso[list.size()]);
	}
}

